package com.jingsheng.jingshengcity.di.module;

import com.jess.arms.di.scope.ActivityScope;
import com.jingsheng.jingshengcity.mvp.contract.DiscoverFragmentContract;
import com.jingsheng.jingshengcity.mvp.model.DiscoverFragmentModel;

import dagger.Module;
import dagger.Provides;


/**
 * Created by Administrator on 2017/5/5.
 */

@Module
public class DiscoverFragmentModule {
    private DiscoverFragmentContract.View view;

    /**
     * 构建DiscoverFragmentModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public DiscoverFragmentModule(DiscoverFragmentContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    DiscoverFragmentContract.View provideDiscoverFragmentView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    DiscoverFragmentContract.Model provideDiscoverFragmentModel(DiscoverFragmentModel model) {
        return model;
    }
}